home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ddj0897.zip / DYN401.ZIP / examples / exam03 / main.c < prev    next >
C/C++ Source or Header  |  1995-09-27  |  2KB  |  106 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6. /*
  7.  *
  8.  *    This source code is CONFIDENTIAL and
  9.  *    PROPRIETARY to Algorithms Corporation. Unauthorized
  10.  *    distribution, adaptation or use    may
  11.  *    be subject to civil and    criminal penalties.
  12.  *
  13.  *    Copyright (c) 1993 Algorithms Corporation
  14.  *    3020 Liberty Hills Drive
  15.  *    Franklin, TN  37064
  16.  *
  17.  *    ALL RIGHTS RESERVED.
  18.  *
  19.  *
  20.  *
  21.  */
  22.  
  23.  
  24.  
  25. #include "generics.h"
  26.  
  27.  
  28. main(int argc, char *argv[])
  29. {
  30.     object    myObj;
  31.  
  32.     InitDynace(&argc);
  33.  
  34.  
  35.     /*  Create and use an instance of the ShortInteger class */
  36.  
  37.     myObj = gNewWithInt(ShortInteger,  6);
  38.     gPrint(myObj, stdoutStream);
  39.     gChangeShortValue(myObj, 77);
  40.     gPrint(myObj, stdoutStream);
  41.     gDispose(myObj);
  42.  
  43.     /*  Create and use an instance of the String class */
  44.  
  45.     myObj = gNewWithStr(String, "Hello World.");
  46.     gPrint(myObj, stdoutStream);
  47.     gChangeStrValue(myObj, "New String Value");
  48.     gPrint(myObj, stdoutStream);
  49.     gDispose(myObj);
  50.  
  51.  
  52.  
  53.     /*  Create and use an instance of the DoubleFloat class */
  54.  
  55.     myObj = gNewWithDouble(DoubleFloat, 3.1415926);
  56.     gPrint(myObj, stdoutStream);
  57.     gChangeDoubleValue(myObj, 7.2144);
  58.     gPrint(myObj, stdoutStream);
  59.     gDispose(myObj);
  60.  
  61.  
  62.     /*  Create and use an instance of the Character class */
  63.  
  64.     myObj = gNewWithChar(Character, 'A');
  65.     gPrint(myObj, stdoutStream);
  66.     gChangeCharValue(myObj, 'B');
  67.     gPrint(myObj, stdoutStream);
  68.     gDispose(myObj);
  69.  
  70.  
  71.     /*  Create and use an instance of the Date class */
  72.  
  73.     myObj = gNewWithLong(Date, 19930802L);
  74.     gPrint(myObj, stdoutStream);
  75.     gChangeLongValue(myObj, 19580608L);
  76.     gPrint(myObj, stdoutStream);
  77.     gDispose(myObj);
  78.  
  79.     return 0;
  80. }
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88. /*
  89.  *
  90.  *    This source code is CONFIDENTIAL and
  91.  *    PROPRIETARY to Algorithms Corporation. Unauthorized
  92.  *    distribution, adaptation or use    may
  93.  *    be subject to civil and    criminal penalties.
  94.  *
  95.  *    Copyright (c) 1993 Algorithms Corporation
  96.  *    3020 Liberty Hills Drive
  97.  *    Franklin, TN  37064
  98.  *
  99.  *    ALL RIGHTS RESERVED.
  100.  *
  101.  *
  102.  *
  103.  */
  104.  
  105.  
  106.